package main

import (
	"gitee.com/ymofen/gobase"
	"gitee.com/ymofen/panicsafe"
	"time"
)

func main() {
	panicsafe.EnablePanicRecordFile("log", "dump")
	fname := gobase.ParseFileName("log/$(exename)-fatal-$(pid)-$(yyyymmdd).log")
	_ = gobase.SetFatalWriteFile(fname)
	gobase.LogPrintf("hello:%s", gobase.NowString())
	go func() {
		buf := gobase.RandBuf(24)
		gobase.Infof("%d", buf[25])

		//golog.Infof("%s", "hello world")
	}()
	time.Sleep(time.Second * 10)
}
